Qos on a virtual interface over multi-path transport

ABSTRACT

Exemplary methods receiving a packet of a virtual interface provisioned with a virtual interface QoS, wherein the virtual interface comprises a hierarchy of sub interfaces. The methods include selecting a virtual adjacency from a plurality of virtual adjacencies, wherein each virtual adjacency is associated with the virtual interface or a sub interface of the virtual interface. The methods include using the selected virtual adjacency to select a queue based on a priority of the packet, and store the packet in the selected queue. The methods include performing hierarchical scheduling based on the virtual interface QoS to select the queue from all sets of virtual interface queues of all virtual adjacencies, and sending the packet from the selected queue and a transport link identifier (ID) to a physical network processing unit.

FIELD

Embodiments of the invention relate to the field of packet networks; andmore specifically, to the enforcement of Quality of Services (QoS) on avirtual interface over multi-path transport.

BACKGROUND

FIG. 1 is a block diagram illustrating a typical traffic flow over avirtual interface. As used herein, a “virtual interface” refers to anyconstruct which is not entirely defined by its physicality. Examples ofvirtual interfaces include, but are not limited to, Pseudo-Wire (PW),Link Aggregation Group (LAG), Layer 2 Tunneling Protocol (L2TP) NetworkServer (LNS), Multilink Point-to-Point (MLPPP) multi-protocol (MP), etc.Network traffic egressing (i.e., exiting) a virtual interface can berouted over a multi-path topology. In other words, the virtual interfaceis connected to a physical network using multiple physical transportlinks. Although QoS features are typically applied on the virtualinterface, each packet needs to egress out of one of the physicaltransport links associated with the virtual interface. Each physicaltransport link can be shared by other interfaces and may have its ownQoS hierarchy.

Conventionally, QoS are implemented on a virtual interface using eitherthe distributed service model (as illustrated in FIG. 2) or the pinnedservice model (as illustrated in FIG. 3). In the distributed servicemodel, QoS resources are replicated on each physical transport link.This model allows for the multi-path topology to be fully utilized. Inthe pinned service model, QoS resources are pinned to a particularegress physical transport link. This model allows for efficientutilization of resources and virtual interface aggregate level shaping.

The distributed service model, however, suffers multiple drawbacks. Forexample, this model requires QoS resources to be replicated across eachof the physical transport links. Further, in the distributed servicemodel, virtual interface aggregate level shaping and metering areunachievable. The pinned service model also suffers multiple drawbacks.For example, this model restricts the ability of forwarding to usemulti-path topology. In both models, the virtual interfaces are tightlycoupled to the physical transport links, which is not well suited fornetwork function virtualization (NFV).

SUMMARY

Exemplary methods performed by a first network device for applyingQuality-of-Service (QoS) on a virtual interface over a multi-pathtransport topology includes receiving a packet of the virtual interface,wherein the virtual interface is provisioned with a virtual interfaceQoS, and wherein the virtual interface comprises a hierarchy of subinterfaces. The methods include selecting a virtual adjacency from aplurality of virtual adjacencies maintained by the first network devicebased on metadata included in the packet, wherein each virtual adjacencyis associated with the virtual interface or a sub interface of thevirtual interface. In one embodiment, the methods include using theselected virtual adjacency to select a queue from a set of virtualinterface queues of the selected virtual adjacency based on a priorityof the packet, and store the packet in the selected queue.

In one embodiment, the methods include performing hierarchicalscheduling based on the virtual interface QoS to select the queue fromall sets of virtual interface queues of all virtual adjacencies, andsending the packet from the selected queue and a transport linkidentifier (ID) to a physical network processing unit (NPU) that is toforward the packet over a physical transport link identified by thetransport link ID, to cause the physical NPU to apply a QoS on thepacket based on the transport link ID. In one embodiment, the methodsinclude generating the transport link ID based on metadata included aspart of the packet.

In one embodiment, the methods further include using the selectedvirtual adjacency to generate a packet priority and a packet color forthe packet, wherein the packet priority and the packet color are sentalong with the packet to the physical NPU, to cause the physical NPU touse the packet color and packet priority to determine whether to dropthe packet or to queue the packet, and to further cause the physical NPUto use the packet priority to select a queue from a set of virtualinterface queues associated with the virtual interface at the physicalNPU for queueing the packet.

In one embodiment, all traffic of the virtual interface is sent to thefirst network device, thereby allowing the first network device toenforce a consistent throughput over the virtual interface regardless ofhow many physical transport links the virtual interface traffic isdirected to. In one embodiment, the physical NPU is implemented at asecond network device communicatively coupled to the first networkdevice.

Exemplary methods performed by a first network device for applyingQuality-of-Service (QoS) on a virtual interface over a multi-pathtransport topology includes receiving a packet of the virtual interfacefrom a service home network processing unit (NPU), wherein the virtualinterface has been provisioned with a virtual interface QoS, wherein theservice home NPU has applied the virtual interface QoS on the packet,and wherein the packet includes a physical transport link identifier(ID) that identifies a physical transport link over which the packet isto be forwarded by the first network device.

In one embodiment, the methods include selecting a virtual adjacencyfrom a plurality of virtual adjacencies maintained by the first networkdevice based on metadata included in the packet, wherein each virtualadjacency is associated with a virtual interface.

In one embodiment, the methods include using the selected virtualadjacency to select a queue based on the physical transport link ID, andstore the packet in the selected queue. The methods further includeperforming scheduling to select the queue, and sending the packet fromthe selected queue over the physical transport link.

In one embodiment, selecting the queue includes selecting a set ofvirtual interface queues associated with the virtual interface based onthe physical transport link ID, and selecting the queue from theselected set of virtual interface queues based on a packet priorityincluded in the packet. In one embodiment, the methods further includeusing the selected virtual adjacency to select a drop profile from a setof drop profiles associated with the selected queue based on a packetcolor included in the packet, and determine whether or not to drop thepacket based on the selected drop profile.

In one embodiment, performing scheduling to select the queue includesselecting the queue from all sets of virtual interface queues of allvirtual adjacencies based on a bandwidth share parameter associated withthe virtual interface, wherein the bandwidth share parameter indicates aminimum share of a bandwidth on the physical transport link that isguaranteed to the virtual interface. In one embodiment, the service homeNPU is implemented at a second network device communicatively coupled tothe first network device.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention may best be understood by referring to the followingdescription and accompanying drawings that are used to illustrateembodiments of the invention. In the drawings:

FIG. 1 is a block diagram illustrating the traffic flow of a virtualinterface over a multi-path topology.

FIG. 2 is a block diagram illustrating a conventional implementation ofQoS on a virtual interface using the distributed service model.

FIG. 3 is a block diagram illustrating a conventional implementation ofQoS on a virtual interface using the pinned service model.

FIG. 4 is a block diagram illustrating a network comprising of networkdevices for applying QoS on a virtual interface over a multi-pathtopology, according to one embodiment.

FIG. 5 is a flow diagram illustrating a method for applying QoS on avirtual interface over a multi-path topology, according to oneembodiment.

FIG. 6 is a flow diagram illustrating a method for applying QoS on avirtual interface over a multi-path topology, according to oneembodiment.

FIG. 7A illustrates connectivity between network devices (NDs) within anexemplary network, as well as three exemplary implementations of theNDs, according to some embodiments of the invention.

FIG. 7B illustrates an exemplary way to implement the special-purposenetwork device 702 according to some embodiments of the invention.

DESCRIPTION OF EMBODIMENTS

The following description describes methods and apparatuses forenforcing QoS on a virtual interface over a multi-path transport. In thefollowing description, numerous specific details such as logicimplementations, opcodes, means to specify operands, resourcepartitioning/sharing/duplication implementations, types andinterrelationships of system components, and logicpartitioning/integration choices are set forth in order to provide amore thorough understanding of the present invention. It will beappreciated, however, by one skilled in the art that the invention maybe practiced without such specific details. In other instances, controlstructures, gate level circuits and full software instruction sequenceshave not been shown in detail in order not to obscure the invention.Those of ordinary skill in the art, with the included descriptions, willbe able to implement appropriate functionality without undueexperimentation.

References in the specification to “one embodiment,” “an embodiment,”“an example embodiment,” etc., indicate that the embodiment describedmay include a particular feature, structure, or characteristic, butevery embodiment may not necessarily include the particular feature,structure, or characteristic. Moreover, such phrases are not necessarilyreferring to the same embodiment. Further, when a particular feature,structure, or characteristic is described in connection with anembodiment, it is submitted that it is within the knowledge of oneskilled in the art to affect such feature, structure, or characteristicin connection with other embodiments whether or not explicitlydescribed.

Bracketed text and blocks with dashed borders (e.g., large dashes, smalldashes, dot-dash, and dots) may be used herein to illustrate optionaloperations that add additional features to embodiments of the invention.However, such notation should not be taken to mean that these are theonly options or optional operations, and/or that blocks with solidborders are not optional in certain embodiments of the invention.

In the following description and claims, the terms “coupled” and“connected,” along with their derivatives, may be used. It should beunderstood that these terms are not intended as synonyms for each other.“Coupled” is used to indicate that two or more elements, which may ormay not be in direct physical or electrical contact with each other,co-operate or interact with each other. “Connected” is used to indicatethe establishment of communication between two or more elements that arecoupled with each other.

An electronic device or a computing device stores and transmits(internally and/or with other electronic devices over a network) code(which is composed of software instructions and which is sometimesreferred to as computer program code or a computer program) and/or datausing machine-readable media (also called computer-readable media), suchas machine-readable storage media (e.g., magnetic disks, optical disks,read only memory (ROM), flash memory devices, phase change memory) andmachine-readable transmission media (also called a carrier) (e.g.,electrical, optical, radio, acoustical or other form of propagatedsignals—such as carrier waves, infrared signals). Thus, an electronicdevice (e.g., a computer) includes hardware and software, such as a setof one or more processors coupled to one or more machine-readablestorage media to store code for execution on the set of processorsand/or to store data. For instance, an electronic device may includenon-volatile memory containing the code since the non-volatile memorycan persist code/data even when the electronic device is turned off(when power is removed), and while the electronic device is turned onthat part of the code that is to be executed by the processor(s) of thatelectronic device is typically copied from the slower non-volatilememory into volatile memory (e.g., dynamic random access memory (DRAM),static random access memory (SRAM)) of that electronic device. Typicalelectronic devices also include a set or one or more physical networkinterface(s) to establish network connections (to transmit and/orreceive code and/or data using propagating signals) with otherelectronic devices. One or more parts of an embodiment of the inventionmay be implemented using different combinations of software, firmware,and/or hardware.

A network device (ND) is an electronic device that communicativelyinterconnects other electronic devices on the network (e.g., othernetwork devices, end-user devices). Some network devices are “multipleservices network devices” that provide support for multiple networkingfunctions (e.g., routing, bridging, switching, Layer 2 aggregation,session border control, Quality of Service, and/or subscribermanagement), and/or provide support for multiple application services(e.g., data, voice, and video).

Conventional methods for providing QoS on a virtual interface routedover a multi-path topology suffer from multiple limitations. Embodimentsof the present invention overcome such limitations by providingmechanisms that allow:

-   -   1. Load-balancing and packet-hashed forwarding over multiple        transport links while honoring aggregate QoS on a virtual        interface.    -   2. Hierarchical coupling of QoS behavior on the virtual        interface with that of the physical transport links which lie        after the virtual interface aggregate point and represent the        final point of exit in the packet forwarding path.    -   3. Maintaining consistent aggregate throughput and priority        order over the virtual interface regardless of the distribution        of transport links across different exit points within a network        device.    -   4. De-coupling the virtual interface from physical transport        link scheduling, thereby making it suitable for NFV.

Throughout the description, references are made to “QoS”. As usedherein, “QoS” refers to a set of (optional) policing, queueing, andscheduling policies that are applied (individually or in any combinationthereof) to network traffic in order to enforce various predetermined“quality of services” (e.g., maximum/minimum rate, maximum/minimumburst, weight, priority, congestion avoidance attributes, etc.) As usedherein, “policing policies” provide rate-limiting of traffic in a mannerthat is different from shaping. Traffic policing, for example, canresult in a packet being dropped in order to avoid exceeding the definedrate limit. Traffic shaping, on the other hand, can result in a packetbeing buffered (e.g., through scheduling deferral decisions) until itcan be transmitted without exceeding the defined rate limit. Trafficpolicing can be applied to multiple classes of traffic, and the policingresults can be combined across the hierarchical levels, as well aspacket marking which can either be based on rate-limiting results,conditioned on traffic-class only, or fully unconditional.

As used herein, “marking a packet” refers to generating/assigning apacket with a color and/or a priority based on the current packet rate.Here, a “packet color” refers to its drop precedence. For example, acolor “red” indicates the packet has high drop precedence (making itmore likely to be dropped by the queue congestion management mechanism),while a color “green” indicates the packet has low drop precedence(making less likely to be dropped by the queue congestion managementmechanism). It shall be understood that other colors can be included aspart of the packet marking mechanism. Results of policing (e.g., packetcolor and/or priority) are propagated to queuing, where queue congestionmanagement and queue selection are performed.

As used herein, “queueing policies” refer to queue congestion managementand packet queueing. Queue congestion management refers to thedetermination of whether packets are to be dropped or queued based onits color. Packet queuing may be based on packet color and/or packetpriority. For example, based on a packet's priority, a queue is firstselected. Each queue is associated with a plurality of drop profiles.One drop profile is selected based on the packet color, and a congestionmanagement algorithm (e.g., the weighted random early detection (WRED)algorithm) is applied using the selected drop profile. It shall beunderstood that any congestion algorithm can be applied to performcongestion management. The result is that the packet is either droppedor queued into a queue that is selected based on its priority.

As used herein, “scheduling policies” determine how packets arescheduled, including prioritization of traffic between different queues,or sets of queues, shaping of the traffic within the queues or sets ofqueues. As used herein, “scheduling” refers to the process of selectinga packet from one of the multiple packet queues for transmission. Therecan be a hierarchy of queues that belong to a hierarchy of subinterfaces of a virtual interface. In such an embodiment, the schedulingis performed hierarchically, described in further details below. Thequeue selection is based on various criteria including queue prioritywhich is referred to as prioritization. Scheduling can also be based onan adherence to a set of defined rate limits which is referred to astraffic shaping. As described above, QoS refers to a set of optionalpolicing, queuing, and scheduling policy that can be applied in anycombination thereof. Thus, “applying a QoS” refers to the application ofoptional policing policy, and/or queueing policy, and/or schedulingpolicy.

Throughout the description, references are made to a virtual interface.It shall be understood that a virtual interface can comprise of ahierarchy of sub interfaces. Here, a “hierarchy of sub interfaces”refers to the notion that a virtual interface includes one or more subinterfaces, and that each of these sub interfaces may comprise of one ormore other sub interfaces, which in turn may include other subinterfaces, and so on, thus forming a “hierarchy” of sub interfaces.

Each sub interface is associated with (i.e., provisioned) a QoS(commonly referred to as the “sub interface QoS”). As used herein, a“sub interface QoS” refers to the QoS that is applied/enforced at eachsub interface to determine how packets should be queued, and howscheduling should be performed at that sub interface. For example, eachsub interface QoS may specify the minimum/maximum rate, minimum/maximumburst, weight, priority, and queue congestion avoidance/handlingattributes for the respective sub interface. In addition to the subinterface QoS provisioned for each of the sub interfaces, the virtualinterface is also provisioned with a virtual interface QoS. As usedherein, the “virtual interface QoS” refers to the QoS that isapplied/enforced on the entire virtual interface to determine howpackets should be queued, and how scheduling should be performed at thevirtual interface, where all sub interface traffic is aggregated. Forexample, the virtual interface QoS may specify the minimum/maximum rate,minimum/maximum burst, weight, priority, and queue congestionavoidance/handling attributes for the entire virtual interface.

By way of example, suppose that a virtual interface comprises of ahierarchy of four sub interfaces (herein referred to as sub interfacesA, B, C, and D), which have been assigned the sub interface QoS A, B, C,and D, respectively. In this example, assume that sub interfaces A and Bare immediately below the virtual interface, and that sub interfaces Cand D are immediately below sub interface A. In other words, the virtualinterface comprises of sub interfaces A and B, and sub interface Acomprises sub interfaces C and D. Note here that traffic may betransmitted on each sub interface, and that each sub interface serves asan aggregate point for sub interfaces below it. In cases where trafficis sent on the sub interface (i.e., the sub interface is not just anaggregate point), the sub interface is associated with a set of virtualinterface queues (which are interchangeably referred to as VI-Qs). Notefurther that the virtual interface serves as an aggregate point for allits sub interfaces, and that traffic may also be transmitted on thevirtual interface itself (i.e., traffic is not required to betransmitted on sub interfaces only). In cases where traffic is also senton the virtual interface, the virtual interface is also associated witha set of VI-Qs, which must compete for bandwidth with other queues fromthe sub interfaces. For the sake of simplicity, however, the descriptionshall herein only refer to the sub interfaces. It shall be understood,however, that the policing, queuing, and scheduling mechanisms describedherein apply equally to the virtual interface in cases where traffic aresent at the virtual interface level.

In the hierarchy of sub interfaces described above, the packets of eachsub interface are policed (i.e., dropped or assigned a packetcolor/priority) using a policing policy associated with the respectivesub interface QoS. For example, a policer of a sub interface determineswhether to drop a packet or mark it with a priority/color based on thecurrent packet rate. In response to determining not to drop the packet,the policer passes the packet to a queue manager associated with the subinterface QoS. The queue manager selects a queue from the set of VI-Qsassociated with the sub interface based on the packet priority. Eachqueue is associated with a plurality of drop profiles. The queue managerselects a drop profile based on the packet color, and applies acongestion algorithm using the selected drop profile. In response todetermining not to drop the packet, the queue manager inserts the packetin the selected queue. Thus, packets are policed and queued at each subinterface based on its own sub interface QoS parameters such as priorityand queue congestion avoidance attributes (i.e., drop profiles).

In order to perform packet scheduling under a hierarchy of subinterfaces, a hierarchy of scheduling nodes are implemented/configuredfor the virtual interface. Throughout the description, the hierarchy ofscheduling nodes are interchangeably referred to as a “scheduling cone”.Each scheduling node of the scheduling cone is configured to schedulequeues based on its sub interface QoS (except for the scheduling node atthe virtual interface level, which schedules queues based on its virtualinterface QoS). Continuing on with the above example, a first level ofthe scheduling cone comprises of a first scheduling node (associatedwith sub interface QoS C) configured to select a queue from the set ofVI-Qs that are associated with sub interface C, wherein the queue isselected based on the sub interface QoS associated with (i.e.,provisioned for) sub interface C. For example, the queue may be selectedbased on the maximum/minimum rate, maximum/minimum burst, and priorityprovisioned as part of the sub interface QoS. The first level of thescheduling cone further includes a second scheduling node (associatedwith sub interface QoS D) configured to select a queue from the set ofVI-Qs that are associated with sub interface D based on its provisionedsub interface QoS. The winning queues selected by the first and secondscheduling nodes of the first level are sent to a second level of thescheduling cone.

The second level of the scheduling cone comprises of a first schedulingnode (associated with sub interface QoS A) configured to select a queueeither from the winning queues the first level of the scheduling cone(i.e., the winning queue from sub interface C or D) or select a queuefrom the set of VI-Qs that are associated with sub interface A based onits sub interface QoS. In other words, this scheduling node may selectthe queue from its own VI-Qs or from the winning queues which wereselected by the scheduling nodes below it. The selection of the queue isbased on, for example, the maximum/minimum rate, maximum/minimum burst,and priority provisioned as part of the sub interface QoS A. The secondlevel of the scheduling cone further includes a second scheduling node(associated with sub interface QoS B) configured to select a queue fromthe set of VI-Qs that are associated with sub interface B based on itssub interface QoS. It is to be noted here that sub interface B is notconfigured to serve as an aggregate point (i.e., there are no subinterfaces below it), and thus its VI-Qs do not have to compete withwinning queues from scheduling nodes below it. The winning queuesselected by the first and second scheduling nodes of the second levelare sent to a third level of the scheduling cone, which in this example,is the final scheduling level of the hierarchy.

The third level of the scheduling cone comprises a scheduling node(associated with the virtual interface QoS) is configured to select aqueue either from the winning queue of the first scheduling node or thesecond scheduling node of the second level (i.e., either the winningqueue from sub interface A or B) based on the virtual interface QoSprovisioned at the virtual interface level. A packet is then de-queuedfrom the winning queue of the third/final level, and transmitted. Thus,the packet which is selected for transmission is hierarchicallyscheduled based on all the sub interface QoS and further based on thevirtual interface QoS.

It should be noted that in the above example, if traffic is alsotransmitted at the virtual interface level (e.g., in addition to the subinterfaces), then a set of VI-Qs must also be provisioned for thevirtual interface. The packets at this virtual interface level arepoliced and queued based on the virtual interface QoS. Further, theVI-Qs at the virtual interface level must compete for bandwidth with thewinning queues from the sub interfaces below the virtual interface. Inthe above example, the first level of the scheduling cone shall bereferred to as the “lowest level”, and the third level of the schedulingcone shall be referred to as the “highest level”.

A network device, as used herein, includes one or more slots. A card(e.g., a line card, service card, etc.) is hot pluggable into each slot.Line cards make up the data plane, while the control cards provide thecontrol plane and exchange packets with other network devices throughthe line cards. Each line card includes one or more network processingunits (NPUs). As used herein, an NPU refers to a collection of softwareand/or hardware resources (e.g., one or more processors, memory,communication interfaces, etc.) responsible for performing theforwarding function. Each NPU includes one or more physical transportlinks, over which packets are exchanged with other network devices.

According to one embodiment, packets that belong to a virtual interfacewhich have QoS policies attached to them, are first forwarded to thevirtual interface's “service home NPU”, where policing and queuing ofpackets at each of the sub interface and/or at the virtual interfacebased on the sub interface QoS and/or the virtual interface QoS,respectively, are performed. As used herein, a “service home NPU” refersto an NPU (i.e., single physical location) where the virtual interfaceQoS is applied. As used herein, “virtual interface QoS application”refers to the hierarchical scheduling of a queue as described above. Forexample, each scheduling node performs scheduling based on its subinterface QoS to select a winning queue (either from its own VI-Qs orwinning queues from the scheduling node below it).

The winning queue is then propagated to the scheduling node above it,which in turn performs scheduling based on its sub interface QoS toselect a winning queue (either from its own VI-Qs or winning queues fromthe scheduling node below it). Hierarchical scheduling is performeduntil the “top” of the scheduling cone is reached, where scheduling isperformed based on the virtual interface QoS to select a winning queue(either from its own VI-Qs or winning queues from the scheduling nodesbelow it). Thus, it should be understood that a winning packet of thescheduling cone (i.e., the packet de-queued from the winning queue atthe top of the scheduling cone) can come from any level of the hierarchyof sub interfaces (i.e., the winning packet can be from any of the subinterface or the virtual interface).

It should be noted that the winning packet, although it can come fromany of the sub interfaces, must necessarily adhere to the virtualinterface QoS, otherwise, it would not have been scheduled by the topscheduling node. For example, a queue may propagate from the bottom ofthe hierarchy of sub interfaces all the way up to the top, but if itsrate, burst, or priority does not adhere to the virtual interface QoS,it will not be scheduled. In one embodiment, the top scheduling node isconfigured to limit the rate and burst of the traffic to a predeterminedrate (e.g., maximum rate) and a predetermined burst (e.g., maximumburst), respectively. Thus, traffic exiting the service home NPU can belimited at, for example, the maximum rate and maximum burst, providingfor a consistent throughput over the virtual interface.

Subsequently, the winning packets (i.e., those which adhere to thevirtual interface QoS, e.g., packets which have not exceeded theprovisioned maximum rate and maximum burst) are forwarded to one or moreegress points. The egress point shall herein be referred to as the“physical NPU”. The physical NPU can be the same as or different NPUfrom the service home NPU. Further, the service home NPU and thephysical NPU may be on the same or different line cards. The servicehome NPU and physical NPUs may even be on different network devices.Each physical NPU is selected by a multi-path link selection algorithmimplemented as part of the ingress forwarding path.

The results of the QoS applied at the service home NPU are propagated tothe physical transport links of the physical NPU, where another QoS isapplied. In one embodiment, the “QoS application results” include, butare not limited to, the color, priority, and transport link ID of thewinning packet. The physical NPU uses the transport link ID identify aset of resources (e.g., optional policing policies, queueing policies,virtual interface queues, etc.)

In an embodiment where policers are implemented, the packet color fromthe service home NPU may be combined with (i.e., modified by) the colorassigned by the policer of the physical transport link at the physicalNPU. The combined/modified color and the priority from the service homeNPU are then used by the physical transport link to perform queuecongestion management and queue selection. In an embodiment where thephysical transport link is not configured with policing policies, thephysical transport link is to use the color and priority provided by theservice home NPU for performing queue congestion management and queueselection.

In some embodiments, the physical transport links of the physical NPUare shared by multiple virtual interfaces. In such embodiments, eachphysical transport link is configured with a bandwidth share parameterfor each virtual interface. As used herein, a “bandwidth shareparameter” refers to an amount of bandwidth that is reserved on aphysical transport link for a corresponding virtual interface. Thebandwidth share parameter, for example, can be used to guarantee thatthe corresponding virtual interface will have at least a predeterminedminimum bandwidth on the physical transport link. The packets then exitthe physical NPU using one or more of its physical transport links.

As described above, packets that belong to a virtual interface are sentto a service home NPU. The service home NPU is selected by theconfiguration plane software, for example, the module which owns theparticular virtual interface type. By way of example, in the case of PW,LNS, MLPPP, and LAG, the owner module would be the PW/multiprotocollabel switching (MPLS) daemon, L2TP daemon, PPP daemon, link-groupdaemon, respectively. It should be noted that the owner module has tomanage multiple instances of its own virtual interface type and eachmodule should balance the load on multiple NPUs by distributing virtualinterface instances across different service home NPUs. Service home NPUassignment is to be propagated to the routing modules/daemons, where theroute across the virtual interface will be set up over the service homeNPU, regardless of the location of physical transport links. In otherwords, the control software which manages the network device should setup the forwarding database so that traffic entering the ingress linecards are routed to the service home NPU.

Embodiments of the present invention, by forwarding all traffic of thevirtual interface to a single service home NPU (where virtual interfaceQoS is applied) and propagating the QoS application results to thephysical NPU (where physical transport link level QoS is applied),maintain a consistent aggregate level throughput (e.g., maximum/minimumrate and maximum/minimum burst) and priority order over the virtualinterface regardless of the distribution of the virtual interfacetraffic over multiple physical transport links across different exitpoints (which may have varying levels of QoS). In other words, byapplying virtual interface QoS on all traffic of a virtual interface ata single point, aggregate level throughput can be guaranteed to behonored regardless of which physical transport link the packets areeventually routed to. By propagating the virtual interface QoSapplication results to the physical NPU, embodiments of the presentinvention ensures packets are prioritized and queue congestion arehandled in a manner such that they are consistent with the virtualinterface QoS, regardless of which physical transport link the trafficis routed to.

In contrast, a conventional method of QoS application on a virtualinterface over a multi-path transport topology cannot achieve suchconsistency because each physical transport link is associated with itsown physical transport link level QoS, and the transmissioncharacteristics of the packets are only bounded by the physicaltransport link level QoS. These physical transport link level QoS(either individually or cumulatively) may, for example, exceed thevirtual interface QoS (e.g., maximum rate and maximum burst) of thevirtual interface, thus violating the throughput restriction of thevirtual interface QoS provisioned at the virtual interface level.Further, each of these conventional transport link level QoS does nottake into account the results of the QoS application at the virtualinterface level, and thus, packets may be prioritized and/or congestionmay be handled inconsistently among the physical transport links, eventhough all the traffic belong to the same virtual interface.

By way of example, assume that a virtual interface has been assigned avirtual interface QoS “a”, and the physical transport links can supportphysical transport link level QoS “b” and “c”. Conventionally, the QoSthat gets applied to the virtual interface traffic depends on thephysical transport link it gets routed to. For example, QoS “b” or “c”may be enforced on the virtual interface traffic even though the virtualinterface has been provisioned with QoS “a”. In contrast, by using themechanisms of the present invention, the virtual interface traffic willbe subject to QoS “a” regardless of which physical transport link thetraffic gets routed to. Embodiments of the present invention shallbecome apparent through the discussion of various figures below.

FIG. 4 is a block diagram illustrating a network comprising of networkdevices 400-402 communicatively coupled to each other. In this example,network devices 400-402 include ingress NPU 410, service home NPU 403,and physical NPU 404, respectively. The distribution of these NPUs overthree network devices are shown for illustrative purposes, and notintended to be limitations of the present invention. It is to beappreciated that ingress NPU 410, service home NPU 403, and physical NPU404 can be arranged/located in any combination of network devices. Forexample, ingress NPU 410, service home NPU 403, and physical NPU 404 mayall be in the same network device. By way of further example, ingressNPU 410 and physical NPU 404 may be on one network device while servicehome NPU 403 may be on a different network device.

According to one embodiment, in response to receiving a packet, ingressNPU 410 is configured to determine the packet's virtual adjacency,service home NPU, physical adjacency, and physical NPU, for example, byusing the packet header information (e.g., addressing information) tolookup a forwarding database. In one embodiment, the informationidentifying the determined virtual adjacency, service home NPU, physicaladjacency, and physical NPU are encapsulated onto the packet asmetadata. In this example, ingress NPU 410 receives packet 413-A whichmay include a payload (not shown). Ingress NPU 410 encapsulates theinformation identifying the virtual adjacency, service home NPU,physical adjacency, and physical NPU of packet 413-A into virtualadjacency ID 440, service home NPU 442, physical adjacency ID 441, andphysical NPU 443, respectively, of packet 413-B, and sends it towardsservice home NPU 403.

Each physical transport link is associated with its own physicaltransport link level QoS. Conventionally, virtual interface traffic,when sent to the physical transport link, is subject only to thephysical transport link level QoS. The result is that when multiplephysical transport links are used to carry the virtual interfacetraffic, the aggregate bandwidth over the multiple physical transportlinks may exceed the virtual interface QoS that was provisioned on thevirtual interface. Embodiments of the present invention overcome theselimitations by directing all traffic of a virtual interface to a singleservice home NPU. In this way, the throughput of the virtual traffic isconsistent, regardless of which physical transport links the trafficgets routed to. The service home NPU, for example, can be configured toenforce the maximum rate and maximum burst provisioned as part of thevirtual interface QoS.

Service home NPU 403 shall now be described with reference to thehierarchy of sub interfaces example described above. Virtual interfacetraffic, as described above, can be sent at the virtual interface aswell as the sub interfaces. In one embodiment, service home NPU 403includes a plurality of virtual adjacencies, wherein each virtualadjacency is associated with a sub interface or the virtual interfaceover which the traffic is sent. Each virtual adjacency is configured toapply the sub interface QoS provisioned for the sub interface that thevirtual adjacency is associated with. In the case of the virtualinterface, a virtual adjacency is configured to apply the virtualinterface QoS that the virtual adjacency is associated with. For thesake of simplicity and clarity in the description, however, the virtualadjacencies shall herein be described only in the context of subinterfaces. It should be understood, however, that theoperations/functions of the virtual adjacency described herein applyequally to the virtual interface (i.e., the virtual adjacency can alsobe used to apply the virtual interface QoS provisioned for the virtualinterface). By of example, in the hierarchy of sub interfaces exampledescribed above, service home NPU 403 would include a virtual adjacencyfor each of the sub interfaces A, B, C, and D.

In response to receiving a packet, service home NPU 403 sends the packetto a virtual adjacency identified by the virtual adjacency ID includedin the packet. In the illustrated example, service home NPU 403 receivespacket 4130B, and based on the identifier contained in virtual adjacencyID 440, service home NPU 403 sends the packet to virtual adjacency 411.

Virtual adjacency 411 includes optional policer 424, queue manager 421,and VI-Qs 425, for applying the sub interface QoS provisioned for thesub interface that virtual adjacency 411 is associated with. In oneembodiment, virtual adjacency 411 is configured to generate a packetcolor and/or priority for each ingress packet. As used herein,“generating a packet color/priority” refers to accessing the packetcolor/priority encapsulated in the ingress packet (e.g., packet 413-B),and encapsulating the accessed packet color/priority in the egresspacket (e.g., packet 413-C) prior to sending it over to a physical NPU(e.g., physical NPU 404). Alternatively, “generating a packetcolor/priority” can refer to the assignment of a packet color/priorityby an optional “color aware” policer implemented at virtual adjacency411.

In the illustrated embodiment, virtual adjacency 411 includes optionalpolicer 424 configured to apply a policing policy, wherein the policingpolicy is associated with the sub interface QoS that virtual adjacency411 is configured to apply. Here, applying the policing policy refers tothe monitoring the packet rate of packets flowing through virtualadjacency 411 and determining whether the packets adhere to thepredetermined packet rate. In one embodiment, policer 424 is “coloraware”. As used herein, a “color aware policer” refers to a policer thattakes as input a color assigned by a policer in a previous stage, andcan either maintain, promote, or demote the color. For example, policer424 may maintain a packet color that was embedded in an ingress packet(e.g., packet 413-B). Alternatively, policer 424 may demote a packetcolor, for example, by modifying an incoming packet marked with a color“green” to a color “red”. Conversely, policer 424 may promote a color,for example, by modifying an incoming packet marked with a color “red”color to a color “green”.

In response to determining a packet does not adhere to the predeterminedrate, policer 424 drops/discards the packet. Alternatively, in responseto determining a packet adheres to the predetermined rate, policer 424marks the packet (i.e., assigns it a color and priority) based on thecurrent packet rate. Again, this may be the same color, demoted color,or promoted color. In an embodiment where policer 424 is implemented,the color assigned by policer 424 is used by queue manager 421. In analternate embodiment where policer 424 is not implemented, the packetcolor included as part of the incoming packet is used by queue manager421.

In one embodiment, virtual adjacency 411 includes queue manager 421configured to apply a queueing policy, wherein the queueing policy isassociated with the sub interface QoS that virtual adjacency 411 isconfigured to apply. Here, applying the queuing policy refers performingqueue congestion management/avoidance and packet queueing. In oneembodiment, queue manager 421 applies the queueing policy to select adrop profile and apply it to a congestion algorithm (e.g., WRED). Forexample, queue manager 421 is to determine which queue of VI-Qs 425 apacket should be inserted in based on the priority of the packet. In oneembodiment, each queue of VI-Qs 425 is associated with a plurality ofdrop profiles which define whether a packet is to be dropped based onvarious parameters.

In one embodiment, queue manager 421 applies the queuing policy toselect a drop profile from the plurality of drop files associated withthe selected queue based on the packet color. Queue manager 421 thenapplies the selected drop profile on a congestion algorithm (e.g., WRED)to determine whether the packet should be dropped or inserted into theselected queue. In response to determining not to drop a packet, queuemanager 421 applies the queueing policy to insert the packet into theselected queue. Thus, by including queue manager 421 and optionalpolicer 424, virtual adjacency 411 is able to apply/enforce the subinterface QoS parameters (e.g., priority and congestion avoidanceattributes).

According to one embodiment, service home NPU 403 includes scheduler 423which represents the scheduling cone described above, i.e., scheduler423 performs the operations of the scheduling nodes of each level of thescheduling cone. In the hierarchy of sub interfaces described in theabove example, scheduler 423 would select a queue from the VI-Qs of thevirtual adjacency associated with sub interface C based on itsprovisioned sub interface QoS C. Further, scheduler 423 would select aqueue from the VI-Qs of the virtual adjacency associated with subinterface D based on its provisioned sub interface QoS D. The winningqueue from sub interface C and the winning queue from sub interface Dare then passed to the next level.

Continuing on with the above example, scheduler 423 then selects a queueeither from the winning queues of the first level (i.e., the winningqueue from sub interface C or D) or from the VI-Qs of the virtualadjacency associated with sub interface A based on its provisioned subinterface QoS A. Further, scheduler 423 would select a queue from theVI-Qs of the virtual adjacency associated with sub interface B based onits provisioned sub interface QoS B. The winning queue from subinterface A and the winning queue from sub interface B are then passedto the next level.

Referring still the above example, scheduler 423 then selects a queuefrom the winning queues of the second level (i.e., the winning queuesfrom sub interface A or B) based on the virtual interface QoSprovisioned for the virtual interface. A winning packet is thende-queued from the winning queue selected at the final/highest level,and sent to the physical NPU. In the illustrated example, scheduler 423has de-queued packet 413-C from the winning queue and sent it tophysical NPU 404.

It should be noted that in the above example, if traffic is alsotransmitted at the virtual interface level (e.g., in addition to the subinterfaces), then a virtual adjacency must also be implemented as partof service home NPU 403 to apply the virtual interface QoS for policingand queuing of packets to be sent at the virtual interface level.Further, scheduler 423 must consider the VI-Qs of this virtual adjacencywhen performing scheduling at the top of the scheduling cone.

It should be noted that once a winning packet has been scheduled from avirtual adjacency and sent to its physical NPU, the winning packet hasbeen subjected to the virtual interface QoS. That is to say, althoughthe winning packet can come from any of the sub interfaces (i.e., anyvirtual adjacency), it must necessarily adhere to the virtual interfaceQoS, otherwise, it would not have been scheduled by the top schedulingnode. For example, a queue may propagate from the bottom of thehierarchy of sub interfaces all the way up to the top, but if its rate,burst, or priority does not adhere to the virtual interface QoS, it willnot be scheduled. In one embodiment, scheduler 423 is configured tolimit the rate and burst of the traffic exiting service home NPU 403 tothe maximum rate and burst, respectively, of the virtual interface QoS.

According to one embodiment, each virtual adjacency includes a virtualadjacency translation map for mapping physical adjacency IDs (includedas part of the metadata of each received packet) into physical transportlink IDs, which identify the physical transport links that the packetsare to be transmitted over. Thus, the virtual adjacency translation mapsenable traffic of the virtual interface to be load balanced overmultiple physical transport links. In the illustrated example, virtualadjacency 411 includes virtual adjacency translation map 426 for mappingphysical adjacency IDs into physical transport link IDs.

Conventionally, each physical transport link applies its physicaltransport link level QoS without any regards to the QoS provisioned atthe virtual interface. The result is that packets may be prioritized ina manner that is inconsistent with the prioritization required by theQoS provisioned at the virtual interface. Further, the congestionhandling of the packets may not be consistent with the QoS provisionedat the virtual interface level. To further exacerbate the problem, theprioritization and congestion handling at each physical transport linkmay produce a different result, and thus, traffic belonging to the samevirtual interface may have transmission characteristics that areinconsistent when they are transmitted over the physical transportlinks. Embodiments of the present invention overcome these limitationsby propagating the QoS application results from the service home NPU tothe physical NPUs.

According to one embodiment, virtual adjacency 411 is configured toencapsulate the QoS application results of each packet onto the packetprior to sending the packet to a physical NPU. In the illustratedexample, virtual adjacency 411 encapsulates the physical transport linkID, color, and priority of packet 413-B into physical transport link ID450, color 451, and priority 452, respectively, of packet 413-C andsends it to physical NPU 404.

According to one embodiment, physical NPU 404 includes a plurality ofvirtual adjacencies, each corresponding to a virtual interface. Eachvirtual adjacency is configured to apply on the packets the physicaltransport link level QoS associated with a physical transport link.Contrary to a conventional physical transport link level QoSapplication, the virtual adjacencies of physical NPU 404 apply thephysical transport link level QoS using the QoS application results thatare included in the packets.

In response to receiving a packet, physical NPU 404 determines whichvirtual adjacency to send the packet to based on the virtual adjacencyID included in the packet. In the illustrated example, physical NPU 404receives packet 413-C, and based on the identifier included in virtualadjacency ID 440, sends the packet to virtual adjacency 412.

In order for an optional policer at the physical transport link to becoupled with the optional policer of the service home NPU, the virtualadjacency at the physical NPU needs to maintain a provisionedlink-to-policer map, where the transport link ID is used as an index toretrieve/access a policer. As illustrated, virtual adjacency 412includes optional link-to-policer map 437 which maps a physicaltransport link ID (included as part of an incoming packet) to one ofoptional policers 434. Policers 434 are configured to apply policingpolicies of the virtual interface that virtual adjacency 412 isassociated with. Policers 434 perform operations similar to thoseperformed by policer 424. For example, policers 434 may maintain apacket color that was determined by policer 424. Alternatively, policers434 may demote an incoming packet marked with a color “green” to a color“red”. Conversely, policers 434 may promote an incoming packet markedwith a color “red” color to a color “green”.

According to one embodiment, policers 434 are configured to eithermaintain or demote a packet color, and not promote a packet color. Inthis way, the throughput flowing through the physical transport link canbe capped at the maximum rate and maximum burst that had already beenenforced by service home NPU 403, thus honoring the virtual interfaceQoS that is provisioned at the virtual interface level. Color demotionmay be caused by various reasons, for example, the packet rate enforcedby service home NPU 403 may be too high for virtual adjacency 412 tohandle. In response to determining a packet does not adhere to apredetermined rate, policer 434 drops/discards the packet.Alternatively, in response to determining a packet adheres to thepredetermined rate, policer 434 marks the packet (i.e., assigns it acolor and priority) based on the current packet rate. Again, this may bethe same or demoted color.

In an embodiment where policers 434 are implemented, the color assignedby one of policers 434 is used by queue manager 431. In an alternateembodiment where policers 434 are not implemented, the packet colorincluded as part of the incoming packet is used by queue manager 431. Inembodiments where policers 434 are implemented, they must use theaggregate token bucket assigned to the physical transport link so thatthe traffic from multiple virtual interfaces going over the samephysical transport link updates the same token bucket.

In order for a packet at the physical transport link to be sent to thecorresponding virtual interface queue, the virtual adjacency at thephysical NPU needs to include a provisioned link-to-queue map, where thetransport link ID is used as an index to retrieve/access a set of VI-Qsassociated with the virtual interface. For example, queue manager 431first uses the physical transport link ID (included in the packet) toindex link-to-queue map 438 to identify a set of queues from VI-Qs 435that are associated with the virtual interface. Queue manager 431 thenuses the packet priority to select a queue from the identified set ofqueues.

In one embodiment, each queue is associated with a plurality of dropprofiles. In one embodiment, queue manager 431 is to select a dropprofile from the plurality of drop files associated with the selectedqueue based on the packet color. Queue manager 431 then applies theselected drop profile on a congestion algorithm (e.g., WRED) todetermine whether the packet should be dropped or inserted into theselected queue. In response to determining not to drop a packet, queuemanager 431 inserts the packet into the selected queue.

According to one embodiment, physical NPU 404 includes scheduler 443configured to schedule/select a queue to transmit from. Each physicaltransport link may be used to transport traffic belonging to multiplevirtual interfaces. In one embodiment, in order to guarantee a minimumbandwidth for each virtual interface, physical NPU 404 is configuredwith a plurality of bandwidth share parameters 436, each correspondingto a virtual interface. Each bandwidth share parameter defines a minimumbandwidth on the physical transport link that is guaranteed to thecorresponding virtual interface. In one embodiment, scheduler 433 usesbandwidth share parameters 436 to ensure that packets are scheduled suchthat each virtual interface is guaranteed a minimum bandwidth on acorresponding physical transport link.

In one embodiment, in response to determining traffic from a particularvirtual interface is to be transmitted, scheduler 433 selects a queuefrom the set of queues that are associated with the virtual interface.Scheduler 433 selects the queue based on the virtual interface QoSprovisioned for the virtual interface. It should be noted that packetwhich are sent by service home NPU 403 are guaranteed to be in adherenceto the maximum rate and maximum burst limit of the virtual interface QoSdue to the scheduling decisions of scheduler 423. In other words,scheduler 423 of service home NPU 403 would not have scheduled and sentthe packet unless the packet was determined to be in adherence to themaximum rate and maximum burst limit required by the virtual interfaceQoS. The minimum rate and minimum burst of the virtual interface QoSprovisioned for the virtual interface, however, are enforced by virtualadjacency 412 of physical NPU 404.

It is to be noted that by combining policing, queueing, and schedulingresults from service home NPU 403 and physical NPU 404, embodiments ofthe invention provide a mechanism for hierarchical coupling of QoSbehavior on the virtual interface with that of the physical transportlinks. It is to be noted that the service home NPUs, such as servicehome NPU 403, are decoupled from the physical NPUs, such as physical NPU404. As such, service home NPUs are well suited to be implemented onvirtual machines. In embodiments where the service home NPU and thephysical NPUs are implemented on different network devices, traffic forthe virtual interface is redirected from its physical nodes (e.g.,ingress NPU 410) with virtual interface tags to the virtualized servicehome NPU (e.g., service home NPU 403) for virtual interface QoSenforcement, and eventually queued to the physical transport link on thephysical node (e.g., physical NPU 404). As described above, ingress NPU410 and physical NPU 404 may be implemented at the same physical node(i.e., network device).

FIG. 5 is a flow diagram illustrating method 500 for applying a QoS on avirtual interface over a multi-path transport topology. For example,method 500 can be performed by service home NPU 403. Method 500 can beimplemented in software, firmware, hardware, or any combination thereof.The operations in this and other flow diagrams will be described withreference to the exemplary embodiments of the other figures. However, itshould be understood that the operations of the flow diagrams can beperformed by embodiments of the invention other than those discussedwith reference to the other figures, and the embodiments of theinvention discussed with reference to these other figures can performoperations different than those discussed with reference to the flowdiagrams.

Referring now to FIG. 5, at block 505 a service home NPU receives apacket (e.g., packet 413-B) of a virtual interface, wherein the virtualinterface is provisioned with a virtual interface QoS, and wherein thevirtual interface comprises a hierarchy of sub interfaces. At block 510,the service home NPU selects a virtual adjacency (e.g., virtualadjacency 411) from a plurality of virtual adjacencies maintained by theservice home NPU based on metadata (e.g., metadata included in virtualadjacency ID 440) included in the packet, wherein each virtual adjacencyis associated with the virtual interface or a sub interface of thevirtual interface.

At block 515, the service home NPU uses the selected virtual adjacencyto select a queue from a set of virtual interface queues of the selectedvirtual adjacency based on a priority of the packet, and store thepacket in the selected queue. For example, if the virtual adjacency isassociated with a sub interface, then the virtual adjacency isconfigured to apply that sub interface's sub interface QoS to performpolicing, queue congestion management, and packet queueing.Alternatively, if the virtual adjacency is associated with the virtualinterface, then the virtual adjacency is configured to apply the virtualinterface QoS to perform policing, queue congestion management, andpacket queueing at the virtual interface level (i.e., the top of thehierarchy).

At block 520, the service home NPU performs hierarchical schedulingbased on the virtual interface QoS to select the queue from all sets ofvirtual interface queues of all virtual adjacencies, and sending thepacket from the selected queue and a transport link identifier (ID) to aphysical network processing unit (NPU) that is to forward the packetover a physical transport link identified by the transport link ID, tocause the physical NPU to apply a QoS on the packet based on thetransport link ID. For example, scheduler 423 performs the operations ofthe scheduling nodes of each level of the scheduling cone, and thepacket from the winning queue at the top of the scheduling cone istransmitted to the physical NPU.

FIG. 6 is a flow diagram illustrating method 600 for applying a QoS on avirtual interface over a multi-path transport topology. For example,method 600 can be performed by physical NPU 404. Method 600 can beimplemented in software, firmware, hardware, or any combination thereof.Referring now to FIG. 6, at block 605 a physical NPU receives a packet(e.g., packet 413-C) of the virtual interface from a service homenetwork processing unit (NPU) (e.g., service home NPU 403), wherein thevirtual interface has been provisioned with a virtual interface QoS,wherein the service home NPU has applied the virtual interface QoS onthe packet, and wherein the packet includes a physical transport linkidentifier (ID) that identifies a physical transport link over which thepacket is to be forwarded by the first network device.

At block 610, the physical NPU selects a virtual adjacency (e.g.,virtual adjacency 412) from a plurality of virtual adjacenciesmaintained by the physical NPU based on metadata (e.g., metadatacontained in virtual adjacency ID 440) included in the packet, whereineach virtual adjacency is associated with a virtual interface.

At block 615, the physical NPU uses the selected virtual adjacency toselect a queue based on the physical transport link ID, and store thepacket in the selected queue. For example, virtual adjacency 412 ofphysical NPU 404 uses the physical transport link ID to indexlink-to-queue map 438 to select set of VI-Qs 435 that are associatedwith the virtual interface, and queue manager 431 uses the packetpriority to select a queue from VI-Qs 435 based on the packet priority.

At block 620, the physical NPU performs scheduling to select the queue.For example, scheduler 433 determines that based on the bandwidth shareparameter associated with the virtual interface indicating it is time totransmit from the virtual interface, scheduler 433 identifies the set ofVI-Qs associated with the virtual interface, and selects a queue fromthe identified set of VI-Qs based on queue priority. At block 625, thephysical NPU sends the packet from the selected queue over the physicaltransport link.

FIG. 7A illustrates connectivity between network devices (NDs) within anexemplary network, as well as three exemplary implementations of theNDs, according to some embodiments of the invention. FIG. 7A shows NDs700A-H, and their connectivity by way of lines between A-B, B-C, C-D,D-E, E-F, F-G, and A-G, as well as between H and each of A, C, D, and G.These NDs are physical devices, and the connectivity between these NDscan be wireless or wired (often referred to as a link). An additionalline extending from NDs 700A, E, and F illustrates that these NDs act asingress and egress points for the network (and thus, these NDs aresometimes referred to as edge NDs; while the other NDs may be calledcore NDs).

Two of the exemplary ND implementations in FIG. 7A are: 1) aspecial-purpose network device 702 that uses custom application—specificintegrated—circuits (ASICs) and a proprietary operating system (OS); and2) a general purpose network device 704 that uses common off-the-shelf(COTS) processors and a standard OS.

The special-purpose network device 702 includes networking hardware 710comprising compute resource(s) 712 (which typically include a set of oneor more processors), forwarding resource(s) 714 (which typically includeone or more ASICs and/or network processors), and physical networkinterfaces (NIs) 716 (sometimes called physical ports), as well asnon-transitory machine readable storage media 718 having stored thereinnetworking software 720. A physical NI is hardware in a ND through whicha network connection (e.g., wirelessly through a wireless networkinterface controller (WNIC) or through plugging in a cable to a physicalport connected to a network interface controller (NIC)) is made, such asthose shown by the connectivity between NDs 700A-H. During operation,the networking software 720 may be executed by the networking hardware710 to instantiate a set of one or more networking software instance(s)722. Each of the networking software instance(s) 722, and that part ofthe networking hardware 710 that executes that network software instance(be it hardware dedicated to that networking software instance and/ortime slices of hardware temporally shared by that networking softwareinstance with others of the networking software instance(s) 722), form aseparate virtual network element 730A-R. Each of the virtual networkelement(s) (VNEs) 730A-R includes a control communication andconfiguration module 732A-R (sometimes referred to as a local controlmodule or control communication module) and forwarding table(s) 734A-R,such that a given virtual network element (e.g., 730A) includes thecontrol communication and configuration module (e.g., 732A), a set ofone or more forwarding table(s) (e.g., 734A), and that portion of thenetworking hardware 710 that executes the virtual network element (e.g.,730A).

Software 720 can include code which be executed by networking hardware710, cause networking hardware 710 to perform operations of one or moreembodiments of the present invention as part networking softwareinstances 722.

The special-purpose network device 702 is often physically and/orlogically considered to include: 1) a ND control plane 724 (sometimesreferred to as a control plane) comprising the compute resource(s) 712that execute the control communication and configuration module(s)732A-R; and 2) a ND forwarding plane 726 (sometimes referred to as aforwarding plane, a data plane, or a media plane) comprising theforwarding resource(s) 714 that utilize the forwarding table(s) 734A-Rand the physical NIs 716. By way of example, where the ND is a router(or is implementing routing functionality), the ND control plane 724(the compute resource(s) 712 executing the control communication andconfiguration module(s) 732A-R) is typically responsible forparticipating in controlling how data (e.g., packets) is to be routed(e.g., the next hop for the data and the outgoing physical NI for thatdata) and storing that routing information in the forwarding table(s)734A-R, and the ND forwarding plane 726 is responsible for receivingthat data on the physical NIs 716 and forwarding that data out theappropriate ones of the physical NIs 716 based on the forwardingtable(s) 734A-R.

FIG. 7B illustrates an exemplary way to implement the special-purposenetwork device 702 according to some embodiments of the invention. FIG.7B shows a special-purpose network device including cards 738 (typicallyhot pluggable). While in some embodiments the cards 738 are of two types(one or more that operate as the ND forwarding plane 726 (sometimescalled line cards), and one or more that operate to implement the NDcontrol plane 724 (sometimes called control cards)), alternativeembodiments may combine functionality onto a single card and/or includeadditional card types (e.g., one additional type of card is called aservice card, resource card, or multi-application card). A service cardcan provide specialized processing (e.g., Layer 4 to Layer 7 services(e.g., firewall, Internet Protocol Security (IPsec), Secure SocketsLayer (SSL)/Transport Layer Security (TLS), Intrusion Detection System(IDS), peer-to-peer (P2P), Voice over IP (VoIP) Session BorderController, Mobile Wireless Gateways (Gateway General Packet RadioService (GPRS) Support Node (GGSN), Evolved Packet Core (EPC) Gateway)).By way of example, a service card may be used to terminate IPsec tunnelsand execute the attendant authentication and encryption algorithms.These cards are coupled together through one or more interconnectmechanisms illustrated as backplane 736 (e.g., a first full meshcoupling the line cards and a second full mesh coupling all of thecards).

Returning to FIG. 7A, the general purpose network device 704 includeshardware 740 comprising a set of one or more processor(s) 742 (which areoften COTS processors) and network interface controller(s) 744 (NICs;also known as network interface cards) (which include physical NIs 746),as well as non-transitory machine readable storage media 748 havingstored therein software 750. During operation, the processor(s) 742execute the software 750 to instantiate a hypervisor 754 (sometimesreferred to as a virtual machine monitor (VMM)) and one or more virtualmachines 762A-R that are run by the hypervisor 754, which arecollectively referred to as software instance(s) 752. A virtual machineis a software implementation of a physical machine that runs programs asif they were executing on a physical, non-virtualized machine; andapplications generally do not know they are running on a virtual machineas opposed to running on a “bare metal” host electronic device, thoughsome systems provide para-virtualization which allows an operatingsystem or application to be aware of the presence of virtualization foroptimization purposes. Each of the virtual machines 762A-R, and thatpart of the hardware 740 that executes that virtual machine (be ithardware dedicated to that virtual machine and/or time slices ofhardware temporally shared by that virtual machine with others of thevirtual machine(s) 762A-R), forms a separate virtual network element(s)760A-R.

The virtual network element(s) 760A-R perform similar functionality tothe virtual network element(s) 730A-R. For instance, the hypervisor 754may present a virtual operating platform that appears like networkinghardware 710 to virtual machine 762A, and the virtual machine 762A maybe used to implement functionality similar to the control communicationand configuration module(s) 732A and forwarding table(s) 734A (thisvirtualization of the hardware 740 is sometimes referred to as networkfunction virtualization (NFV)). Thus, NFV may be used to consolidatemany network equipment types onto industry standard high volume serverhardware, physical switches, and physical storage, which could belocated in Data centers, NDs, and customer premise equipment (CPE).However, different embodiments of the invention may implement one ormore of the virtual machine(s) 762A-R differently. For example, whileembodiments of the invention are illustrated with each virtual machine762A-R corresponding to one VNE 760A-R, alternative embodiments mayimplement this correspondence at a finer level granularity (e.g., linecard virtual machines virtualize line cards, control card virtualmachine virtualize control cards, etc.); it should be understood thatthe techniques described herein with reference to a correspondence ofvirtual machines to VNEs also apply to embodiments where such a finerlevel of granularity is used.

In certain embodiments, the hypervisor 754 includes a virtual switchthat provides similar forwarding services as a physical Ethernet switch.Specifically, this virtual switch forwards traffic between virtualmachines and the NIC(s) 744, as well as optionally between the virtualmachines 762A-R; in addition, this virtual switch may enforce networkisolation between the VNEs 760A-R that by policy are not permitted tocommunicate with each other (e.g., by honoring virtual local areanetworks (VLANs)).

Software 750 can include code which be executed by processor(s) 742,cause processor(s) 742 to perform operations of one or more embodimentsof the present invention as part virtual machine 762A-R.

The third exemplary ND implementation in FIG. 7A is a hybrid networkdevice 706, which includes both custom ASICs/proprietary OS and COTSprocessors/standard OS in a single ND or a single card within an ND. Incertain embodiments of such a hybrid network device, a platform VM(i.e., a VM that that implements the functionality of thespecial-purpose network device 702) could provide forpara-virtualization to the networking hardware present in the hybridnetwork device 706.

Regardless of the above exemplary implementations of an ND, when asingle one of multiple VNEs implemented by an ND is being considered(e.g., only one of the VNEs is part of a given virtual network) or whereonly a single VNE is currently being implemented by an ND, the shortenedterm network element (NE) is sometimes used to refer to that VNE. Alsoin all of the above exemplary implementations, each of the VNEs (e.g.,VNE(s) 730A-R, VNEs 760A-R, and those in the hybrid network device 706)receives data on the physical NIs (e.g., 716, 746) and forwards thatdata out the appropriate ones of the physical NIs (e.g., 716, 746). Forexample, a VNE implementing IP router functionality forwards IP packetson the basis of some of the IP header information in the IP packet;where IP header information includes source IP address, destination IPaddress, source port, destination port (where “source port” and“destination port” refer herein to protocol ports, as opposed tophysical ports of a ND), transport protocol (e.g., user datagramprotocol (UDP), Transmission Control Protocol (TCP), and differentiatedservices (DSCP) values.

A network interface (NI) may be physical or virtual; and in the contextof IP, an interface address is an IP address assigned to a NI, be it aphysical NI or virtual NI. A virtual NI may be associated with aphysical NI, with another virtual interface, or stand on its own (e.g.,a loopback interface, a point-to-point protocol interface). A NI(physical or virtual) may be numbered (a NI with an IP address) orunnumbered (a NI without an IP address). A loopback interface (and itsloopback address) is a specific type of virtual NI (and IP address) of aNE/VNE (physical or virtual) often used for management purposes; wheresuch an IP address is referred to as the nodal loopback address. The IPaddress(es) assigned to the NI(s) of a ND are referred to as IPaddresses of that ND; at a more granular level, the IP address(es)assigned to NI(s) assigned to a NE/VNE implemented on a ND can bereferred to as IP addresses of that NE/VNE.

Next hop selection by the routing system for a given destination mayresolve to one path (that is, a routing protocol may generate one nexthop on a shortest path); but if the routing system determines there aremultiple viable next hops (that is, the routing protocol generatedforwarding solution offers more than one next hop on a shortestpath—multiple equal cost next hops), some additional criteria isused—for instance, in a connectionless network, Equal Cost Multi Path(ECMP) (also known as Equal Cost Multi Pathing, multipath forwarding andIP multipath) may be used (e.g., typical implementations use as thecriteria particular header fields to ensure that the packets of aparticular packet flow are always forwarded on the same next hop topreserve packet flow ordering). For purposes of multipath forwarding, apacket flow is defined as a set of packets that share an orderingconstraint. As an example, the set of packets in a particular TCPtransfer sequence need to arrive in order, else the TCP logic willinterpret the out of order delivery as congestion and slow the TCPtransfer rate down.

A Layer 3 (L3) Link Aggregation (LAG) link is a link directly connectingtwo NDs with multiple IP-addressed link paths (each link path isassigned a different IP address), and a load distribution decisionacross these different link paths is performed at the ND forwardingplane; in which case, a load distribution decision is made between thelink paths.

A virtual circuit (VC), synonymous with virtual connection and virtualchannel, is a connection oriented communication service that isdelivered by means of packet mode communication. Virtual circuitcommunication resembles circuit switching, since both are connectionoriented, meaning that in both cases data is delivered in correct order,and signaling overhead is required during a connection establishmentphase. Virtual circuits may exist at different layers. For example, atlayer 4, a connection oriented transport layer datalink protocol such asTransmission Control Protocol (TCP) may rely on a connectionless packetswitching network layer protocol such as IP, where different packets maybe routed over different paths, and thus be delivered out of order.Where a reliable virtual circuit is established with TCP on top of theunderlying unreliable and connectionless IP protocol, the virtualcircuit is identified by the source and destination network socketaddress pair, i.e. the sender and receiver IP address and port number.However, a virtual circuit is possible since TCP includes segmentnumbering and reordering on the receiver side to prevent out-of-orderdelivery. Virtual circuits are also possible at Layer 3 (network layer)and Layer 2 (datalink layer); such virtual circuit protocols are basedon connection oriented packet switching, meaning that data is alwaysdelivered along the same network path, i.e. through the same NEs/VNEs.In such protocols, the packets are not routed individually and completeaddressing information is not provided in the header of each datapacket; only a small virtual channel identifier (VCI) is required ineach packet; and routing information is transferred to the NEs/VNEsduring the connection establishment phase; switching only involveslooking up the virtual channel identifier in a table rather thananalyzing a complete address. Examples of network layer and datalinklayer virtual circuit protocols, where data always is delivered over thesame path: X.25, where the VC is identified by a virtual channelidentifier (VCI); Frame relay, where the VC is identified by a VCI;Asynchronous Transfer Mode (ATM), where the circuit is identified by avirtual path identifier (VPI) and virtual channel identifier (VCI) pair;General Packet Radio Service (GPRS); and Multiprotocol label switching(MPLS), which can be used for IP over virtual circuits (Each circuit isidentified by a label).

Certain NDs (e.g., certain edge NDs) use a hierarchy of circuits. Theleaf nodes of the hierarchy of circuits are subscriber circuits. Thesubscriber circuits have parent circuits in the hierarchy that typicallyrepresent aggregations of multiple subscriber circuits, and thus thenetwork segments and elements used to provide access networkconnectivity of those end user devices to the ND. These parent circuitsmay represent physical or logical aggregations of subscriber circuits(e.g., a virtual local area network (VLAN), a permanent virtual circuit(PVC) (e.g., for Asynchronous Transfer Mode (ATM)), a circuit-group, achannel, a pseudo-wire, a physical NI of the ND, and a link aggregationgroup). A circuit-group is a virtual construct that allows various setsof circuits to be grouped together for configuration purposes, forexample aggregate rate control. A pseudo-wire is an emulation of a layer2 point-to-point connection-oriented service. A link aggregation groupis a virtual construct that merges multiple physical NIs for purposes ofbandwidth aggregation and redundancy. Thus, the parent circuitsphysically or logically encapsulate the subscriber circuits.

Some portions of the preceding detailed descriptions have been presentedin terms of algorithms and symbolic representations of transactions ondata bits within a computer memory. These algorithmic descriptions andrepresentations are the ways used by those skilled in the dataprocessing arts to most effectively convey the substance of their workto others skilled in the art. An algorithm is here, and generally,conceived to be a self-consistent sequence of transactions leading to adesired result. The transactions are those requiring physicalmanipulations of physical quantities. Usually, though not necessarily,these quantities take the form of electrical or magnetic signals capableof being stored, transferred, combined, compared, and otherwisemanipulated. It has proven convenient at times, principally for reasonsof common usage, to refer to these signals as bits, values, elements,symbols, characters, terms, numbers, or the like.

It should be borne in mind, however, that all of these and similar termsare to be associated with the appropriate physical quantities and aremerely convenient labels applied to these quantities. Unlessspecifically stated otherwise as apparent from the above discussion, itis appreciated that throughout the description, discussions utilizingterms such as “processing” or “computing” or “calculating” or“determining” or “displaying” or the like, refer to the action andprocesses of a computer system, or similar electronic computing device,that manipulates and transforms data represented as physical(electronic) quantities within the computer system's registers andmemories into other data similarly represented as physical quantitieswithin the computer system memories or registers or other suchinformation storage, transmission or display devices.

The algorithms and displays presented herein are not inherently relatedto any particular computer or other apparatus. Various general-purposesystems may be used with programs in accordance with the teachingsherein, or it may prove convenient to construct more specializedapparatus to perform the required method transactions. The requiredstructure for a variety of these systems will appear from thedescription above. In addition, embodiments of the present invention arenot described with reference to any particular programming language. Itwill be appreciated that a variety of programming languages may be usedto implement the teachings of embodiments of the invention as describedherein.

In the foregoing specification, embodiments of the invention have beendescribed with reference to specific exemplary embodiments thereof. Itwill be evident that various modifications may be made thereto withoutdeparting from the broader spirit and scope of the invention as setforth in the following claims. The specification and drawings are,accordingly, to be regarded in an illustrative sense rather than arestrictive sense.

Throughout the description, embodiments of the present invention havebeen presented through flow diagrams. It will be appreciated that theorder of transactions and transactions described in these flow diagramsare only intended for illustrative purposes and not intended as alimitation of the present invention. One having ordinary skill in theart would recognize that variations can be made to the flow diagramswithout departing from the broader spirit and scope of the invention asset forth in the following claims.

What is claimed is:
 1. A method in a first network device for applyingQuality-of-Service (QoS) on a virtual interface over a multi-pathtransport topology, the method comprising: receiving a packet of thevirtual interface, wherein the virtual interface is provisioned with avirtual interface QoS, and wherein the virtual interface comprises ahierarchy of sub interfaces; selecting a virtual adjacency from aplurality of virtual adjacencies maintained by the first network devicebased on metadata included in the packet, wherein each virtual adjacencyis associated with the virtual interface or a sub interface of thevirtual interface; using the selected virtual adjacency to select aqueue from a set of virtual interface queues of the selected virtualadjacency based on a priority of the packet, and store the packet in theselected queue; performing hierarchical scheduling based on the virtualinterface QoS to select the queue from all sets of virtual interfacequeues of all virtual adjacencies; and sending the packet from theselected queue and a transport link identifier (ID) to a physicalnetwork processing unit (NPU) that is to forward the packet over aphysical transport link identified by the transport link ID, to causethe physical NPU to apply a QoS on the packet based on the transportlink ID.
 2. The method of claim 1, further comprising: generating thetransport link ID based on metadata included as part of the packet. 3.The method of claim 1, further comprising using the selected virtualadjacency to generate a packet priority and a packet color for thepacket, wherein the packet priority and the packet color are sent alongwith the packet to the physical NPU, to cause the physical NPU to usethe packet color and packet priority to determine whether to drop thepacket or to queue the packet, and to further cause the physical NPU touse the packet priority to select a queue from a set of virtualinterface queues associated with the virtual interface at the physicalNPU for queueing the packet.
 4. The method of claim 1, wherein alltraffic of the virtual interface is sent to the first network device,thereby allowing the first network device to enforce a consistentthroughput over the virtual interface regardless of how many physicaltransport links the virtual interface traffic is directed to.
 5. Themethod of claim 1, wherein the physical NPU is implemented at a secondnetwork device communicatively coupled to the first network device.
 6. Afirst network device for applying Quality-of-Service (QoS) on a virtualinterface over a multi-path transport topology, the first network devicecomprising: a set of one or more processors; and a non-transitorymachine-readable storage medium containing code, which when executed bythe set of one or more processors, cause the first network device to:receive a packet of the virtual interface, wherein the virtual interfaceis provisioned with a virtual interface QoS, and wherein the virtualinterface comprises a hierarchy of sub interfaces; select a virtualadjacency from a plurality of virtual adjacencies maintained by thefirst network device based on metadata included in the packet, whereineach virtual adjacency is associated with the virtual interface or a subinterface of the virtual interface; use the selected virtual adjacencyto select a queue from a set of virtual interface queues of the selectedvirtual adjacency based on a priority of the packet, and store thepacket in the selected queue; perform hierarchical scheduling based onthe virtual interface QoS to select the queue from all sets of virtualinterface queues of all virtual adjacencies; and send the packet fromthe selected queue and a transport link identifier (ID) to a physicalnetwork processing unit (NPU) that is to forward the packet over aphysical transport link identified by the transport link ID, to causethe physical NPU to apply a QoS on the packet based on the transportlink ID.
 7. The first network device of claim 6, wherein thenon-transitory machine-readable storage medium further contains code,which when executed by the set of one or more processors, cause thefirst network device to: generate the transport link ID based onmetadata included as part of the packet.
 8. The first network device ofclaim 6, wherein the non-transitory machine-readable storage mediumfurther contains code, which when executed by the set of one or moreprocessors, cause the first network device to use the selected virtualadjacency to generate a packet priority and a packet color for thepacket, wherein the packet priority and the packet color are sent alongwith the packet to the physical NPU, to cause the physical NPU to usethe packet color and packet priority to determine whether to drop thepacket or to queue the packet, and to further cause the physical NPU touse the packet priority to select a queue from a set of virtualinterface queues associated with the virtual interface at the physicalNPU for queueing the packet.
 9. The first network device of claim 6,wherein all traffic of the virtual interface is sent to the firstnetwork device, thereby allowing the first network device to enforce aconsistent throughput over the virtual interface regardless of how manyphysical transport links the virtual interface traffic is directed to.10. The first network device of claim 6, wherein the physical NPU isimplemented at a second network device communicatively coupled to thefirst network device.
 11. A non-transitory computer-readable storagemedium having computer code stored therein, which when executed by aprocessor of a first network device for applying Quality-of-Service(QoS) on a virtual interface over a multi-path transport topology, causethe first network device to perform operations comprising: receiving apacket of the virtual interface, wherein the virtual interface isprovisioned with a virtual interface QoS, and wherein the virtualinterface comprises a hierarchy of sub interfaces; selecting a virtualadjacency from a plurality of virtual adjacencies maintained by thefirst network device based on metadata included in the packet, whereineach virtual adjacency is associated with the virtual interface or a subinterface of the virtual interface; using the selected virtual adjacencyto select a queue from a set of virtual interface queues of the selectedvirtual adjacency based on a priority of the packet, and store thepacket in the selected queue; performing hierarchical scheduling basedon the virtual interface QoS to select the queue from all sets ofvirtual interface queues of all virtual adjacencies; and sending thepacket from the selected queue and a transport link identifier (ID) to aphysical network processing unit (NPU) that is to forward the packetover a physical transport link identified by the transport link ID, tocause the physical NPU to apply a QoS on the packet based on thetransport link ID.
 12. The non-transitory computer-readable storagemedium of claim 11, further comprising: generating the transport link IDbased on metadata included as part of the packet.
 13. The non-transitorycomputer-readable storage medium of claim 11, further comprising usingthe selected virtual adjacency to generate a packet priority and apacket color for the packet, wherein the packet priority and the packetcolor are sent along with the packet to the physical NPU, to cause thephysical NPU to use the packet color and packet priority to determinewhether to drop the packet or to queue the packet, and to further causethe physical NPU to use the packet priority to select a queue from a setof virtual interface queues associated with the virtual interface at thephysical NPU for queueing the packet.
 14. The non-transitorycomputer-readable storage medium of claim 11, wherein all traffic of thevirtual interface is sent to the first network device, thereby allowingthe first network device to enforce a consistent throughput over thevirtual interface regardless of how many physical transport links thevirtual interface traffic is directed to.
 15. The non-transitorycomputer-readable storage medium of claim 11, wherein the physical NPUis implemented at a second network device communicatively coupled to thefirst network device.
 16. A method in a first network device forapplying Quality-of-Service (QoS) on a virtual interface over amulti-path transport topology, the method comprising: receiving a packetof the virtual interface from a service home network processing unit(NPU), wherein the virtual interface has been provisioned with a virtualinterface QoS, wherein the service home NPU has applied the virtualinterface QoS on the packet, and wherein the packet includes a physicaltransport link identifier (ID) that identifies a physical transport linkover which the packet is to be forwarded by the first network device;selecting a virtual adjacency from a plurality of virtual adjacenciesmaintained by the first network device based on metadata included in thepacket, wherein each virtual adjacency is associated with a virtualinterface; using the selected virtual adjacency to select a queue basedon the physical transport link ID, and store the packet in the selectedqueue; performing scheduling to select the queue; and sending the packetfrom the selected queue over the physical transport link.
 17. The methodof claim 16, wherein selecting the queue comprises: selecting a set ofvirtual interface queues associated with the virtual interface based onthe physical transport link ID; and selecting the queue from theselected set of virtual interface queues based on a packet priorityincluded in the packet.
 18. The method of claim 17, further comprisingusing the selected virtual adjacency to: select a drop profile from aset of drop profiles associated with the selected queue based on apacket color included in the packet; and determine whether or not todrop the packet based on the selected drop profile.
 19. The method ofclaim 16, wherein performing scheduling to select the queue comprises:selecting the queue from all sets of virtual interface queues of allvirtual adjacencies based on a bandwidth share parameter associated withthe virtual interface, wherein the bandwidth share parameter indicates aminimum share of a bandwidth on the physical transport link that isguaranteed to the virtual interface.
 20. The method of claim 16, whereinthe service home NPU is implemented at a second network devicecommunicatively coupled to the first network device.
 21. A first networkdevice for applying Quality-of-Service (QoS) on a virtual interface overa multi-path transport topology, the first network device comprising: aset of one or more processors; and a non-transitory machine-readablestorage medium containing code, which when executed by the set of one ormore processors, cause the first network device to: receive a packet ofthe virtual interface from a service home network processing unit (NPU),wherein the virtual interface has been provisioned with a virtualinterface QoS, wherein the service home NPU has applied the virtualinterface QoS on the packet, and wherein the packet includes a physicaltransport link identifier (ID) that identifies a physical transport linkover which the packet is to be forwarded by the first network device;select a virtual adjacency from a plurality of virtual adjacenciesmaintained by the first network device based on metadata included in thepacket, wherein each virtual adjacency is associated with a virtualinterface; use the selected virtual adjacency to select a queue based onthe physical transport link ID, and store the packet in the selectedqueue; perform scheduling to select the queue; and send the packet fromthe selected queue over the physical transport link.
 22. The firstnetwork device of claim 21, wherein selecting the queue comprises thefirst network device to: select a set of virtual interface queuesassociated with the virtual interface based on the physical transportlink ID; and select the queue from the selected set of virtual interfacequeues based on a packet priority included in the packet.
 23. The firstnetwork device of claim 22, wherein the non-transitory machine-readablestorage medium further contains code, which when executed by the set ofone or more processors, cause the first network device to use theselected virtual adjacency to: select a drop profile from a set of dropprofiles associated with the selected queue based on a packet colorincluded in the packet; and determine whether or not to drop the packetbased on the selected drop profile.
 24. The first network device ofclaim 21, wherein performing scheduling to select the queue comprisesthe first network device to: select the queue from all sets of virtualinterface queues of all virtual adjacencies based on a bandwidth shareparameter associated with the virtual interface, wherein the bandwidthshare parameter indicates a minimum share of a bandwidth on the physicaltransport link that is guaranteed to the virtual interface.
 25. Thefirst network device of claim 21, wherein the service home NPU isimplemented at a second network device communicatively coupled to thefirst network device.
 26. A non-transitory computer-readable storagemedium having computer code stored therein, which when executed by aprocessor of a first network device for applying Quality-of-Service(QoS) on a virtual interface over a multi-path transport topology, causethe first network device to perform operations comprising: receiving apacket of the virtual interface from a service home network processingunit (NPU), wherein the virtual interface has been provisioned with avirtual interface QoS, wherein the service home NPU has applied thevirtual interface QoS on the packet, and wherein the packet includes aphysical transport link identifier (ID) that identifies a physicaltransport link over which the packet is to be forwarded by the firstnetwork device; selecting a virtual adjacency from a plurality ofvirtual adjacencies maintained by the first network device based onmetadata included in the packet, wherein each virtual adjacency isassociated with a virtual interface; using the selected virtualadjacency to select a queue based on the physical transport link ID, andstore the packet in the selected queue; performing scheduling to selectthe queue; and sending the packet from the selected queue over thephysical transport link.
 27. The non-transitory computer-readablestorage medium of claim 26, wherein selecting the queue comprises:selecting a set of virtual interface queues associated with the virtualinterface based on the physical transport link ID; and selecting thequeue from the selected set of virtual interface queues based on apacket priority included in the packet.
 28. The non-transitorycomputer-readable storage medium of claim 27, further comprising usingthe selected virtual adjacency to: select a drop profile from a set ofdrop profiles associated with the selected queue based on a packet colorincluded in the packet; and determine whether or not to drop the packetbased on the selected drop profile.
 29. The non-transitorycomputer-readable storage medium of claim 26, wherein performingscheduling to select the queue comprises: selecting the queue from allsets of virtual interface queues of all virtual adjacencies based on abandwidth share parameter associated with the virtual interface, whereinthe bandwidth share parameter indicates a minimum share of a bandwidthon the physical transport link that is guaranteed to the virtualinterface.
 30. The non-transitory computer-readable storage medium ofclaim 26, wherein the service home NPU is implemented at a secondnetwork device communicatively coupled to the first network device. 31.A method in a virtual machine for applying Quality-of-Service (QoS) on avirtual interface over a multi-path transport topology, the methodcomprising: receiving a packet of the virtual interface, wherein thevirtual interface is provisioned with a virtual interface QoS, andwherein the virtual interface comprises a hierarchy of sub interfaces;selecting a virtual adjacency from a plurality of virtual adjacenciesmaintained by the virtual machine based on metadata included in thepacket, wherein each virtual adjacency is associated with the virtualinterface or a sub interface of the virtual interface; using theselected virtual adjacency to select a queue from a set of virtualinterface queues of the selected virtual adjacency based on a priorityof the packet, and store the packet in the selected queue; performinghierarchical scheduling based on the virtual interface QoS to select thequeue from all sets of virtual interface queues of all virtualadjacencies; and sending the packet from the selected queue and atransport link identifier (ID) to a physical network processing unit(NPU) that is to forward the packet over a physical transport linkidentified by the transport link ID, to cause the physical NPU to applya QoS on the packet based on the transport link ID.
 32. The method ofclaim 31, further comprising: generating the transport link ID based onmetadata included as part of the packet.
 33. The method of claim 31,further comprising using the selected virtual adjacency to generate apacket priority and a packet color for the packet, wherein the packetpriority and the packet color are sent along with the packet to thephysical NPU, to cause the physical NPU to use the packet color andpacket priority to determine whether to drop the packet or to queue thepacket, and to further cause the physical NPU to use the packet priorityto select a queue from a set of virtual interface queues associated withthe virtual interface at the physical NPU for queueing the packet. 34.The method of claim 31, wherein all traffic of the virtual interface issent to the virtual machine, thereby allowing the virtual machine toenforce a consistent throughput over the virtual interface regardless ofhow many physical transport links the virtual interface traffic isdirected to.
 35. The method of claim 31, wherein the physical NPU isimplemented at a second network device communicatively coupled to thevirtual machine.